package 
{	
	import flash.xml.XMLDocument;
	import flash.xml.XMLNode;
	import mx.collections.ArrayCollection;
	public function createXMLFromGrid( p_xml : XMLNode, p_list : ArrayCollection, p_nodeName: String ):XML
	{
		var xml_list : XMLNode = p_xml.lastChild || p_xml ;
		for each(var row : ARow in p_list){
			xml_list.appendChild( row.toXML( p_nodeName ) );
		}
		return new XML(p_xml);
	}
}